package org.lisen.condition;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;

/**
 * @author laughing
 * @date 2020/9/26
 * @site https://www.lisen.org
 */
@Configuration
public class CommandConfig {

    @Bean
    @Conditional(LinuxCommandCondition.class)
    public CommandCondition linuxCommand(){
        return new LinuxCommand();
    }

    @Bean
    @Conditional(MacCommandCondition.class)
    public CommandCondition macCommand(){
        return new MacCommand();
    }

    @Bean
    @Conditional(WindowsCommandContidion.class)
    public CommandCondition windowsCommand(){
        return new WindowsCommand();
    }

}
